package com.greentravel.model;

/**
 * 共享交通工具实体类
 * 存储共享单车、共享电动车的分布点位与可租用数量信息
 */
public class SharedVehicle {
    private int id; // ID
    private String vehicleType; // 交通工具类型（共享单车、共享电动车）
    private String brand; // 品牌
    private String location; // 分布点位
    private int availableCount; // 可租用数量
    private String region; // 所在地区
    private double longitude; // 经度
    private double latitude; // 纬度

    // 默认构造方法
    public SharedVehicle() {
    }

    // 带参数的构造方法
    public SharedVehicle(int id, String vehicleType, String brand, String location,
            int availableCount, String region, double longitude, double latitude) {
        this.id = id;
        this.vehicleType = vehicleType;
        this.brand = brand;
        this.location = location;
        this.availableCount = availableCount;
        this.region = region;
        this.longitude = longitude;
        this.latitude = latitude;
    }

    // getter和setter方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getVehicleType() {
        return vehicleType;
    }

    public void setVehicleType(String vehicleType) {
        this.vehicleType = vehicleType;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public int getAvailableCount() {
        return availableCount;
    }

    public void setAvailableCount(int availableCount) {
        this.availableCount = availableCount;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    @Override
    public String toString() {
        return "SharedVehicle{" +
                "id=" + id +
                ", vehicleType='" + vehicleType + '\'' +
                ", brand='" + brand + '\'' +
                ", location='" + location + '\'' +
                ", availableCount=" + availableCount +
                ", region='" + region + '\'' +
                ", longitude=" + longitude +
                ", latitude=" + latitude +
                '}';
    }
}